#include <iostream>

// 继承语法 class 子类 : 继承方式 父类

class BasePage
{
public:
    void header()
    {
        std::cout << "header" << std::endl;
    }
    void footer()
    {
        std::cout << "footer" << std::endl;
    }
    void left()
    {
        std::cout << "left" << std::endl;
    }
};

class Java: public BasePage
{
public:
    void content()
    {
        std::cout << "Java content" << std::endl;
    }
};

class Python: public BasePage
{
public:
    void content()
    {
        std::cout << "Python content" << std::endl;
    }
};

class Cpp: public BasePage
{
public:
    void content()
    {
        std::cout << "Cpp content" << std::endl;
    }
};

void test01()
{
    Java java;
    java.header();
    java.left();
    java.content();
    java.footer();

    Python python;
    python.header();
    python.left();
    python.content();
    python.footer();

    Cpp cpp;
    cpp.header();
    cpp.left();
    cpp.content();
    cpp.footer();   
}

int main()
{
    test01();
    return 0;
}